package ivo.HeartBeat;

import ivo.action.CrrAction;
import ivo.tx.Amsheart.AmsheartI;

import java.util.TimerTask;

import javax.servlet.ServletContext;

import org.apache.log4j.Logger;

public class HeartTimer extends TimerTask { 
	   private Logger logger = Logger.getLogger(CrrAction.class);
	   private ServletContext context; 
	   AmsheartI amsheartI =new AmsheartI() ;
	
	    public HeartTimer(ServletContext context){  
           this.setContext(context);  
        }  
	    public HeartTimer() {
			// TODO Auto-generated constructor stub
		}
		public void run(){ 
//			//mqRouter=new MQRouter();
//		    amsheartI.setTrx_id("AMSHEART");
//		    amsheartI.setType_id("I");
//		    amsheartI.setAct_flg("U");
//		    amsheartI.setTool_id("WFM-DW");
//		    String xml = XmlUtil.object2xml(amsheartI);
//		    mqRouter.sendMessageWithNoReply(xml);
		   logger.info("任务开始---->心跳信息 : 有心跳~~~~~~~~~~~~~~~~~~~" );
		 }
		public ServletContext getContext() {
			return context;
		}
		public void setContext(ServletContext context) {
			this.context = context;
		}
}
